In recent years, there have been increased opportunities to use color images as digital data along with the popularization of image-related devices such as a digital camera and a color printer and due to enhanced performance of computers. A color image taken by a digital camera or the like, however, does not always provide a satisfactory image quality to users. For example, in some cases, skin tone is too reddish or the color of sky blue is dull. Therefore, there is a demand for a technique to improve image quality to an image that is satisfactory to users.
For example, JP-A-2001-92956 (Patent document 1) discloses a technique to carry out favorable color correction automatically for colors (human skin color, sky blue color, plant green color, and so on) of an important object in a natural image taken in various light environments. More specifically, it includes: representative color extraction means for reading out an distributable area of the hue of an object selected by object selection means and a distribution frequency in a divided hue region from an object color information memory and extracting a representative color; color correction parameter determination means for determining a color correction parameter optimal for the representative color extracted by the representative color extraction means from stored contents of a color correction parameter storage memory; and color correction means for correcting colors only for representative colors of the object and colors in the vicinity thereof in the input image.
In addition, for example, U.S. Pat. No. 6,535,301 (Patent document 2) discloses a technology to carry out appropriate color correction automatically with considering human memory colors (human skin color, sky blue color, plant green color, and so on). More specifically, it includes: chromaticity determination means for determining chromaticity of each pixel of image data; target chromaticity pixel counting means for counting pixels whose chromaticities determined by the chromaticity determination means are within a predetermined range; color correction amount determination means for determining a color correction amount for eliminating a difference between a predetermined optimal value regarding the pixels whose chromaticities are within the predetermined range and the counting result, and then correcting the color correction amount according to the proportion of the counted pixels relative to the total number of pixels; and color correction means for carrying out color correction of the image data on the basis of the color correction amount.
According to the aforementioned techniques, however, there still remain problems. For example, the technique described in the Patent document 1 adopts a method of generating a histogram based on the hue. In this method, while a stable processing can be expected when detecting an object whose chroma is high to some extent, there is a possibility that an appropriate processing may not be carried out when an object whose chroma is low. For example, in a people photograph, a face slightly palely photographed has a color with a low chroma. The color with a low chroma significantly changes in hue due to a slight color change such as the influence of noise or the influence of an illumination light color. More specifically, the technique has a problem that, when the chroma of an object is low, a distinct peak does not readily appear on the histogram.
FIG. 22A and FIG. 22B show conceptual diagrams for a peak detection, when generating a histogram based on the hue. FIG. 22A shows a color space diagram 1000 and a histogram 1100. The color space diagram 1000 shows an a* axis 1001 and a b* axis 1002 corresponding to a* and b*, respectively, which are color components of, for example, the CIELAB color system, and a distribution range 1010, which is a color distribution range of, for example, a peak (in other words, which contains a large number of pixels) color. In addition, the histogram 1100 has a hue axis 1101, a frequency axis 1102, and a frequency curve 1110.
Here, the color corresponding to the intersection of the a* axis 1001 and the b* axis 1002 is achromatic. Then, the distribution range 1010 is located in a position apart from the intersection of the a* axis 1001 and the b* axis 1002, which indicates that the chroma of the color is relatively high. In this case, the frequency curve 1110 of the histogram 1100 based on the hue has a sharp peak.
FIG. 22B shows a color space diagram 2000 and a histogram 2100. Similarly to the color space diagram 1000, the color space diagram 2000 shows an a* axis 2001 and a b* axis 2002 corresponding to a* and b*, respectively, which are color components of, for example, the CIELAB color system, and a distribution range 2010, which is a distribution range of, for example, a peak color. In addition, similarly to the histogram 1100, the histogram 2100 has a hue axis 2101, a frequency axis 2102, and a frequency curve 2110.
Here, the distribution range 2010 is located in a position close to the intersection of the a* axis 2001 and the b* axis 2002, which indicates that the chroma of the color is relatively low. In this case, the frequency curve 2110 of the histogram 2100 based on the hue does not have a sharp peak, whereby it is hard to detect the peak.
In this manner, when using the histogram based on the hue, the peak shape changes due to the chroma of the image and thereby there is a possibility that an object cannot be detected appropriately.
Moreover, for example, in the technique described in the Patent document 2, the strength of the correction is controlled according to the proportion of the counted pixels. Depending on the image, however, the strength of correction cannot be successfully controlled. For example, whether pixels considered to be of a skin color are scattered or concentrated on one place in the image does not affect the strength of correction. Actually, when there is a skin-color area (for example, a face), which is large to some extent, in the image, a strong correction should be applied to the skin color as a substantial part of the image. In the technique described in the Patent document 2, however, that kind of correction is not carried out. In addition, for the same color, the strength of the correction is uniformly controlled independently of the shape of the area or a degree of the color change. For example, even if it is the skin color area, however, the degree of user's attention varies greatly according to whether or not the area corresponds to a face. Therefore, in the technique described in the Patent document 2, an appropriate correction processing may not be carried out in some cases.